import { makeAutoObservable } from 'mobx'
import request from '@/utils/request'
// 请求频道数据仓库
class Channels {
  constructor() {
    makeAutoObservable(this)
  }
  // 渲染数组
  list = []

  // 请求数据
  getList = async () => {
    const res = await request('/channels')
    this.list = res.data.channels
  }

}

export default Channels